package jw.repository.product;


import jw.model.product.WxProColSize;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface WxProColSizeRepository extends JpaRepository<WxProColSize,Integer>, JpaSpecificationExecutor<WxProColSize> {

    @Query("select p from WxProColSize p where p.productNo =?1 and p.isHide = 0")
    List<WxProColSize>findByProductNo(String productNo);

    @Query("select p from WxProColSize p where p.productNo =?1 and p.colorCode =?2 and p.isHide = 0")
    List<WxProColSize>findByProductNoAndColorCode(String productNo,String colorCode);
}
